<ion-header class="nav-header">
  <ion-toolbar>
    <ion-buttons slot="start" style="padding-right: 5px;">
      <ion-button (click)="backClick()">
        <ion-icon class="md-arrow-back" ios="md-arrow-back"></ion-icon>
      </ion-button>
    </ion-buttons>
    <ion-title>公告</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>
    <ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
        <ion-refresher-content></ion-refresher-content>
      </ion-refresher>
  <ion-list class="notice-list" *ngIf="!(noticeData | empty)">
    <ion-item lines="full" *ngFor="let item of noticeData" detail (click)="toDetail(item);$event.stopPropagation">
      <ion-icon class="iconfont ion-ios-gonggao" style="color: #ffbf0e; font-size: 28px;" slot="start"></ion-icon>
      <ion-label class="contain">
          <h1>{{!(item.title | empty)? (item.title):''}}<span>{{!(item.created | empty)? (item.created | datestr):''}}</span></h1>      
          <div>{{item.content|substr:'[0,100]'}}</div>
      </ion-label>
    </ion-item>
  </ion-list>
  <ion-list class="notice-list" *ngIf="(noticeData | empty)">
      <ion-item lines="none">
        <ion-label class="ion-text-wrap contain">
           暂无公告
        </ion-label>
      </ion-item>
    </ion-list>
    <ion-infinite-scroll threshold="30%" (ionInfinite)="loadMoreData($event)">
        <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="加载更多...">
        </ion-infinite-scroll-content>
      </ion-infinite-scroll>
</ion-content>